//
//  CXYTabBarButton.swift
//  诚叙缘
//
//  Created by sujeking on 17/3/22.
//  Copyright © 2017年 szw. All rights reserved.
//

import UIKit

class CXYTabBarButton: UIButton {
    
    var icon :NSArray!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        
        initIcons()
        setupSubViews()
    }
    
    func setupSubViews() {
        self.backgroundColor = #colorLiteral(red: 0, green: 0, blue: 0, alpha: 0)
        self.setImage(icon.object(at: (self.tag - 100)) as? UIImage, for: UIControlState.normal)
    }
    
    func initIcons() {
        icon = [#imageLiteral(resourceName: "ic_tab_home"),#imageLiteral(resourceName: "ic_tab_msg"),#imageLiteral(resourceName: "ic_tab_gift"),#imageLiteral(resourceName: "ic_tab_my")];
    }
    
}
